package com.xueyi.system.customer.domain.po;

import cn.hutool.json.JSONArray;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.xueyi.common.core.web.tenant.base.TBaseEntity;
import com.xueyi.system.customer.domain.dto.BaseCustomerDto;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.xueyi.common.core.annotation.Excel;

/**
 * 来往企业 持久化对象
 *
 * @author zlf
 */
@TableName(value = "base_customer", excludeProperty = {"sort"},autoResultMap = true)
public class BaseCustomerPo extends TBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId("id")
    private Long id;

    /**
     * 客户编码
     */
    @Excel(name = "客户编码")
    @TableField("code")
    private String code;

    /**
     * 来往类型
     */
    @Excel(name = "来往类型")
    @TableField("type")
    private String type;

    /**
     * 经营类型（1化肥、2农药、3种子、4辅材）
     */
    @Excel(name = "经营类型", readConverterExp = "1=化肥、2农药、3种子、4辅材")
    @TableField("supplier_type")
    private String supplierType;

    /**
     * 供应商供应投入品性质（1化肥、2农药、3种子、4辅材）
     */
    @Excel(name = "供应商供应投入品性质", readConverterExp = "1=化肥、2农药、3种子、4辅材")
    @TableField(value = "supplier_nature", typeHandler = FastjsonTypeHandler.class)
    private JSONArray supplierNature;

    /**
     * 统一信用代码
     */
    @Excel(name = "统一信用代码")
    @TableField("credit_code")
    private String creditCode;

    /**
     * 营业执照
     */
    @Excel(name = "营业执照")
    @TableField("credit_img")
    private String creditImg;

    /**
     * 开户银行
     */
    @Excel(name = "开户银行")
    @TableField("bank_name")
    private String bankName;

    /**
     * 开户号
     */
    @Excel(name = "开户号")
    @TableField("bank_num")
    private String bankNum;

    /**
     * 法定代表人
     */
    @Excel(name = "法定代表人")
    @TableField("representative")
    private String representative;

    /**
     * 联系人
     */
    @Excel(name = "联系人")
    @TableField("contact")
    private String contact;

    /**
     * 联系电话
     */
    @Excel(name = "联系电话")
    @TableField("telephone")
    private String telephone;

    /**
     * 联系地址
     */
    @Excel(name = "联系地址")
    @TableField("address")
    private String address;

    /**
     * 资质
     */


    @TableField(value = "appendix", typeHandler = FastjsonTypeHandler.class)
    private JSONArray appendix;

    /**
     * 邮箱
     */
    @Excel(name = "邮箱")
    @TableField("email")
    private String email;

    /**
     * 状态：1正常 2停用
     */
    @Excel(name = "状态：1正常 2停用")
    @TableField("status")
    private String status;

    public JSONArray getSupplierNature() {
        return supplierNature;
    }

    public void setSupplierNature(JSONArray supplierNature) {
        this.supplierNature = supplierNature;
    }

    @Override
    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public Long getId() {
        return id;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setSupplierType(String supplierType) {
        this.supplierType = supplierType;
    }

    public String getSupplierType() {
        return supplierType;
    }


    public void setCreditCode(String creditCode) {
        this.creditCode = creditCode;
    }

    public String getCreditCode() {
        return creditCode;
    }

    public void setCreditImg(String creditImg) {
        this.creditImg = creditImg;
    }

    public String getCreditImg() {
        return creditImg;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankNum(String bankNum) {
        this.bankNum = bankNum;
    }

    public String getBankNum() {
        return bankNum;
    }

    public void setRepresentative(String representative) {
        this.representative = representative;
    }

    public String getRepresentative() {
        return representative;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getContact() {
        return contact;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAddress() {
        return address;
    }

    public void setAppendix(JSONArray appendix) {
        this.appendix = appendix;
    }

    public JSONArray getAppendix() {
        return appendix;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getEmail() {
        return email;
    }

    @Override
    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String getStatus() {
        return status;
    }

}
